package main

import (
	"encoding/json"
	"fmt"
)

func main() {

	myMap := make(map[string]interface{})
	myMap["hello"] = "world"
	myMap["world"] = "world"
	myMap["num"] = 123
	myMap["list"] = []string{"1", "2", "3"}
	myMap["arr"] = [5]string{"1", "2", "3", "4"}

	fmt.Println(myMap)

	s, _ := json.Marshal(myMap)
	fmt.Println(string(s))

	json1 := json.Unmarshal(s, &myMap)
	fmt.Println(json1)

	fmt.Println(myMap["list"])
	// Invalid operation: 'myMap["list"][0]' (type 'interface{}' does not support indexing)
	//fmt.Println(myMap["list"][0])
	//fmt.Println(myMap["arr"][0])

}
